Page({
	data: {
		categories: [
      {categoryId:0,cateName:'未分类'},
      {categoryId:1,cateName:'蔬菜'},
      {categoryId:2,cateName:'水果'},
      {categoryId:3,cateName:'农家'},
      {categoryId:4,cateName:'家禽'},
      {categoryId:5,cateName:'特产'},
      {categoryId:6,cateName:'手工'},
      {categoryId:7,cateName:'其他'}
    ],
    cateId:0,
    goodsList: [
        {classify:"未分类",description:"好喝又健康的山茶油",name:"兴国山茶油",
      iconUrl:"https://pic.ntimg.cn/file/20201013/31186696_111152252031_2.jpg",price:56,sales:999,specification:"1kg",status:1,storage:89,_id:'11acf1de95e1995d900c2d9e414843bd1'},
      {classify:"未分类",description:"赣南脐橙果肉鲜嫩多汁",name:"脐橙",
      iconUrl:"https://ts1.cn.mm.bing.net/th/id/R-C.e2eb7242be8b6ff3152c3546f728d3fe?rik=WpYubobcq15qxg&riu=http%3a%2f%2fimg95.699pic.com%2fphoto%2f50080%2f9655.jpg_wh860.jpg&ehk=7rmKOb6tgsmDZj%2fAlaDFDP%2bUoNo%2fdrjG6cYX8gMCvSg%3d&risl=&pid=ImgRaw&r=0",price:4,sales:9999,specification:"1kg",status:1,storage:89,_id:'11acf1de95e1995d900c2d9e414843bd1'},
        ]
  },
  onShow:function(e) {
    // 用于设置商品滑动视图的高度
    wx.getSystemInfo({
      success:(res) => {
        this.setData({
          windowHeight:res.windowHeight,
          windowWidth:res.windowWidth
        })
      }
    })
  },
  changeCate:function(e) {
    this.setData({
      cateId: e.target.dataset.id,
    }),
    wx.showToast({
      title: '加载中..',
      icon:'loading',
      duration:1000
    })
    // this.getGoods(this.limit,this.skip);   //请求数据，传入需要的数据条数限制limit,以及起始点skip
  }
})